package com.suineg.pms.service.base;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.suineg.pms.entity.base.Barn;
import com.suineg.pms.repository.base.BarnDao;

/**
 * 车库管理 服务层
 *@author Suine
 */
@Service
@Transactional
public class BarnService {
	/** 日志输出对象 */
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private BarnDao dao;
	
	public Barn get(Long id){
		return dao.findOne(id);
	}
	
	public void save(Barn barn){
		dao.save(barn);
	}
	
	public void delete(Long id){
		dao.delete(id);
	}
	
	/**
	 * 根据 编号
	 * @param no
	 * @return
	 */
	public Barn findByNo(String no){
		return dao.findByNo(no);
	}
}

